package com.guigu.controller;

import com.guigu.dto.MotionDTO;
import com.guigu.entity.MemberBean;
import com.guigu.service.InterventionServce;
import com.guigu.vo.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/inter")
public class InterventionController {
    @Autowired
    private InterventionServce interventionServce;
    @PostMapping("/queryMember")
    @ResponseBody
    public Result queryMember(String name){

        return new Result("200","true","成功查询", this.interventionServce.queryMember(name));
    }

    @GetMapping("/addmotiononmotion_summary")
    @ResponseBody
    public Result addmotiononmotion_summary(MotionDTO motionDTO){
        this.interventionServce.addmotiononmotion_summaryAndaddinterventionAndaddMotionAndaddMeals(motionDTO);
        return new Result("200","true","成功添加", null);
    }
}